1100 |
Is it is possible to exclude the non-working days when displaying the histogram using the exBarEffort for exHistOverAllocation type
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,40); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutHistogramVisible(VARIANT_TRUE); var_Chart->PutHistogramHeight(64); var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Split"); var_Bar->PutPattern(EXG2ANTTLib::exPatternBDiagonal); var_Bar->PutShape(EXG2ANTTLib::exShapeThinUp); var_Bar->PutColor(RGB(0,0,128)); EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Add(L"Task:Split"); var_Bar1->PutColor(RGB(0,0,128)); var_Bar1->PutShortcut(L"WorkingTask"); var_Bar1->PutPattern(EXG2ANTTLib::exPatternBDiagonal); var_Bar1->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal); var_Bar1->PutHistogramType(EXG2ANTTLib::exHistOverAllocation); EXG2ANTTLib::IBarPtr var_Bar2 = var_Chart->GetBars()->GetItem("Task"); var_Bar2->PutColor(RGB(0,0,255)); var_Bar2->PutPattern(EXG2ANTTLib::exPatternFDiagonal); var_Bar2->PutHistogramType(EXG2ANTTLib::exHistOverAllocation); var_Bar2->PutHistogramPattern(EXG2ANTTLib::exPatternFDiagonal); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("True"); var_Items->AddBar(h,"WorkingTask",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,long(4)); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); h = var_Items->AddItem("False"); var_Items->AddBar(h,"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,long(4)); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_FALSE); spG2antt1->EndUpdate(); |
1099 |
I display numbers in my chart, but the AddBar requires a date how can I add a bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutNonworkingDays(0); var_Chart->PutFirstVisibleDate(long(0)); var_Chart->PutToolTip(L""); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%i%>"); var_Level->PutToolTip(""); var_Chart->PutUnitWidth(24); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",long(2),long(4),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",long(6),long(10),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
1098 |
I display numbers in the chart's header but do not want to get displayed negative numbers. How can i do that
// DateChange event - Occurs when the first visible date is changed. void OnDateChangeG2antt1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetChart()->PutFirstVisibleDate(long(0)); spG2antt1->PutScrollPartEnable(EXG2ANTTLib::exHChartScroll,EXG2ANTTLib::exLeftBPart,VARIANT_FALSE); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutNonworkingDays(0); var_Chart->PutFirstVisibleDate(long(0)); var_Chart->PutToolTip(L""); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%i%>"); var_Level->PutToolTip("<%i%>"); var_Chart->PutUnitWidth(24); spG2antt1->EndUpdate(); |
1097 |
How can I display numbers in the chart's header instead dates
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutNonworkingDays(0); var_Chart->PutFirstVisibleDate(long(0)); var_Chart->PutToolTip(L""); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%i%>"); var_Level->PutToolTip(""); var_Chart->PutUnitWidth(24); spG2antt1->EndUpdate(); |
1096 |
How can I create a bar that's not sizable, or can not be resized by default similar with milestone
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,24,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Custom"); var_Bar->PutShape(EXG2ANTTLib::exShapeEmpty); var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconUp1); var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem(""),"Custom",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"K1","This TYPE of bar can not be resized."); spG2antt1->EndUpdate(); |
1095 |
Is it possible to hide the non-working parts for items using the ItemNonworkingUnits, even if set the ShowNonworkingUnits, ShowNonworkingDates on False
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,27,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternEmpty); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->PutItemNonworkingUnits(h2,VARIANT_FALSE,L"weekday(value) = 1"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); spG2antt1->EndUpdate(); |
1094 |
Is it possible to show the non-working parts for certain items, even if I hide the default non-working part
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,27,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->PutItemNonworkingUnits(h2,VARIANT_FALSE,L"weekday(value) = 1"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); spG2antt1->EndUpdate(); |
1093 |
How can I hide the non-working part of the chart
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); spG2antt1->EndUpdate(); |
1092 |
Is it possible to let users selects cells as in Excel
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutFullRowSelect(EXG2ANTTLib::exRectSel); spG2antt1->PutSingleSel(VARIANT_FALSE); spG2antt1->PutReadOnly(EXG2ANTTLib::exReadOnly); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutShowFocusRect(VARIANT_FALSE); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->PutSelForeColor(RGB(0,0,0)); spG2antt1->PutSelBackColor(RGB(200,225,242)); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"A"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"B"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(24); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C"))); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutWidth(24); var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,long(1)); var_Column1->PutPartialCheck(VARIANT_TRUE); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"D"))); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutWidth(24); var_Column2->PutDef(EXG2ANTTLib::exCellHasRadioButton,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->InsertItem(vtMissing,vtMissing,"Group 1"); long h1 = var_Items->InsertItem(h,vtMissing,long(16)); var_Items->PutCellValue(h1,long(1),long(17)); h1 = var_Items->InsertItem(h,vtMissing,long(2)); var_Items->PutCellValue(h1,long(1),long(11)); h1 = var_Items->InsertItem(h,vtMissing,long(2)); var_Items->PutItemBackColor(h1,RGB(240,240,240)); var_Items->PutCellValue(h1,long(1),long(9)); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertItem(vtMissing,vtMissing,"Group 2"); var_Items->PutCellValueFormat(h,long(2),EXG2ANTTLib::exHTML); h1 = var_Items->InsertItem(h,vtMissing,long(16)); var_Items->PutCellValue(h1,long(1),long(9)); h1 = var_Items->InsertItem(h,vtMissing,long(12)); var_Items->PutCellValue(h1,long(1),long(11)); h1 = var_Items->InsertItem(h,vtMissing,long(2)); var_Items->PutCellValue(h1,long(1),long(2)); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutSelectItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1091 |
How can I hide a date from the chart view
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutAllowInsideZoom(VARIANT_TRUE); var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE); var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE); EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms(); var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE); var_InsideZooms->PutDefaultWidth(0); var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE()); var_InsideZooms->Add(COleDateTime(2008,1,5,0,00,00).operator DATE()); var_InsideZooms->Add(COleDateTime(2008,1,6,0,00,00).operator DATE()); var_Chart->PutSelectLevel(1); var_Chart->PutSelectDate(COleDateTime(2008,1,5,0,00,00).operator DATE(),VARIANT_TRUE); spG2antt1->EndUpdate(); |
1090 |
Can the SchedulePDM displays and edit the working units for my bars
// BarResizing event - Occurs when a bar is moving or resizing. void OnBarResizingG2antt1(long Item,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->SchedulePDM(Item,Key); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working"))); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258)); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing); var_Items->AddLink("L1",h1,"",h2,""); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing); var_Items->AddLink("L2",h2,"",h3,""); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"FF"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(2)); long h4 = var_Items->AddItem("Task 4"); var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing); var_Items->AddLink("L3",h4,"",h3,""); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->SchedulePDM(var_Items->GetFirstVisibleItem(),""); spG2antt1->EndUpdate(); |
1089 |
Can the SchedulePDM displays the working units for my bars
// BarResizing event - Occurs when a bar is moving or resizing. void OnBarResizingG2antt1(long Item,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->SchedulePDM(Item,Key); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing); var_Items->AddLink("L1",h1,"",h2,""); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing); var_Items->AddLink("L2",h2,"",h3,""); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"FF"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(2)); long h4 = var_Items->AddItem("Task 4"); var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing); var_Items->AddLink("L3",h4,"",h3,""); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->SchedulePDM(var_Items->GetFirstVisibleItem(),""); spG2antt1->EndUpdate(); |
1088 |
Can the SchedulePDM keeps the working units for my bars
// BarResizing event - Occurs when a bar is moving or resizing. void OnBarResizingG2antt1(long Item,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->SchedulePDM(Item,Key); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"FF"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(2)); long h4 = var_Items->AddItem("Task 4"); var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing); var_Items->AddLink("L3",h4,"K4",h3,"K3"); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1087 |
How can I arrange automatically the bars based on their links as soon as user moves the bars
// BarResizing event - Occurs when a bar is moving or resizing. void OnBarResizingG2antt1(long Item,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->SchedulePDM(Item,Key); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"FF"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(2)); long h4 = var_Items->AddItem("Task 4"); var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing); var_Items->AddLink("L3",h4,"K4",h3,"K3"); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1086 |
How can I arrange automatically the bars based on their links as soon as user moves the bars
// BarResize event - Occurs when a bar is moved or resized. void OnBarResizeG2antt1(long Item,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->SchedulePDM(Item,Key); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1085 |
I have some buttons added on the control's scroll bar, how can I can know when the button is being clicked
// ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar. void OnScrollButtonClickG2antt1(long ScrollBar,long ScrollPart) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"ScrollBar" ); OutputDebugStringW( L"ScrollPart" ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutScrollPartVisible(EXG2ANTTLib::exHScroll,EXG2ANTTLib::exLeftB1Part,VARIANT_TRUE); spG2antt1->PutScrollPartVisible(EXG2ANTTLib::exHScroll,EXG2ANTTLib::exLeftB2Part,VARIANT_TRUE); spG2antt1->PutScrollPartVisible(EXG2ANTTLib::exHScroll,EXG2ANTTLib::exRightB6Part,VARIANT_TRUE); spG2antt1->PutScrollPartVisible(EXG2ANTTLib::exHScroll,EXG2ANTTLib::exRightB5Part,VARIANT_TRUE); spG2antt1->PutScrollBars(EXG2ANTTLib::exDisableNoHorizontal); |
1084 |
How do I get notified once the user clicks a hyperlink created using the anchor HTML tag
// AnchorClick event - Occurs when an anchor element is clicked. void OnAnchorClickG2antt1(LPCTSTR AnchorID,LPCTSTR Options) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"AnchorID" ); OutputDebugStringW( L"Options" ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Default")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("This is a link: <aex.com;1>www.exontrol.com</a>"); var_Items->AddItem("This is a link: <aex.net;2>www.exontrol.net</a>"); |
1083 |
Is it possible to start editing a cell when double click it
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void OnDblClickG2antt1(short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->Edit(vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutAutoEdit(VARIANT_FALSE); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit1")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit2")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(3)),long(1),long(4)); spG2antt1->EndUpdate(); |
1082 |
Is it possible to disable standard single-click behavior for this column, so I manually could call Edit() when needed
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void OnDblClickG2antt1(short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->Edit(vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutAutoEdit(VARIANT_FALSE); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit1")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit2")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(3)),long(1),long(4)); spG2antt1->EndUpdate(); |
1081 |
How can I get or restore the old or previously value for the cell being changed
// Change event - Occurs when the user changes the cell's content. void OnChangeG2antt1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"Old-Value:" ); OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetCellValue(Item,ColIndex)) ); OutputDebugStringW( L"New-Value:" ); OutputDebugStringW( L"NewValue" ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit1")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit2")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(3)),long(1),long(4)); spG2antt1->EndUpdate(); |
1080 |
How can I display the number of items being found after filtering
// FilterChange event - Occurs when the filter was changed. void OnFilterChangeG2antt1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutFilterBarCaption(_bstr_t(spG2antt1->GetItems()->GetVisibleCount())); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptContainsAll); spG2antt1->PutFilterBarPromptPattern(L"london"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1079 |
How can I highligth the item from the cursor as it moves
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); long h = spG2antt1->GetItemFromPoint(-1,-1,c,hit); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->ClearItemBackColor(spG2antt1->GetBackground(EXG2ANTTLib::BackgroundPartEnum(0x200 | EXG2ANTTLib::exHSRight | EXG2ANTTLib::exListOLEDropPosition))); var_Items->PutItemBackColor(h,RGB(240,250,240)); spG2antt1->PutBackground(EXG2ANTTLib::BackgroundPartEnum(0x200 | EXG2ANTTLib::exHSRight | EXG2ANTTLib::exListOLEDropPosition),h); spG2antt1->EndUpdate(); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); spG2antt1->PutSelBackColor(RGB(240,250,240)); spG2antt1->PutSelForeColor(RGB(0,0,0)); spG2antt1->PutShowFocusRect(VARIANT_FALSE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutSelBackColor(RGB(240,250,240)); spG2antt1->GetColumns()->Add(L"Items"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->InsertItem(h,vtMissing,"Cell 1.1"); var_Items->InsertItem(h,vtMissing,"Cell 1.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("R2"); var_Items->InsertItem(h,vtMissing,"Cell 2.1"); var_Items->InsertItem(h,vtMissing,"Cell 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1078 |
How can I get the item from the cursor
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); long h = spG2antt1->GetItemFromPoint(-1,-1,c,hit); OutputDebugStringW( L"Handle" ); OutputDebugStringW( L"h" ); OutputDebugStringW( L"Index" ); OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemToIndex(h)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); spG2antt1->GetColumns()->Add(L"Items"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->InsertItem(h,vtMissing,"Cell 1.1"); var_Items->InsertItem(h,vtMissing,"Cell 1.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("R2"); var_Items->InsertItem(h,vtMissing,"Cell 2.1"); var_Items->InsertItem(h,vtMissing,"Cell 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1077 |
How can I get the column from the cursor, not only in the header
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( _bstr_t(spG2antt1->GetColumnFromPoint(-1,0)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"P1"); spG2antt1->GetColumns()->Add(L"P2"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->PutCellValue(h,long(1),"R2"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 1.1"),long(1),"Cell 1.2"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 2.1"),long(1),"Cell 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1076 |
How can I get the column from the cursor
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( _bstr_t(spG2antt1->GetColumnFromPoint(-1,-1)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->GetColumns()->Add(L"P1"); spG2antt1->GetColumns()->Add(L"P2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->PutCellValue(h,long(1),"R2"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 1.1"),long(1),"Cell 1.2"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 2.1"),long(1),"Cell 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1075 |
How can I get the cell's caption from the cursor
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); long h = spG2antt1->GetItemFromPoint(-1,-1,c,hit); OutputDebugStringW( spG2antt1->GetItems()->GetCellCaption(h,c) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"Items"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("R1"); var_Items->InsertItem(h,vtMissing,"Cell 1.1"); var_Items->InsertItem(h,vtMissing,"Cell 1.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("R2"); var_Items->InsertItem(h,vtMissing,"Cell 2.1"); var_Items->InsertItem(h,vtMissing,"Cell 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1074 |
Is it possible to change the style for the vertical or horizontal grid lines, in the list area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::GridLinesStyleEnum(EXG2ANTTLib::exGridLinesVSolid | EXG2ANTTLib::exGridLinesHDot4)); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); spG2antt1->GetColumns()->Add(L"C3"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->PutCellValue(h,long(1),"SubItem 1.2"); var_Items->PutCellValue(h,long(2),"SubItem 1.3"); h = var_Items->AddItem("Item 2"); var_Items->PutCellValue(h,long(1),"SubItem 2.2"); var_Items->PutCellValue(h,long(2),"SubItem 2.3"); spG2antt1->EndUpdate(); |
1073 |
How can I show the bars over the grid lines, i.e. so you cannot see the grid lines 'through' the bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineColor(RGB(220,220,220)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesBehind); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutDrawGridLines(VARIANT_TRUE); var_Level->PutGridLineColor(RGB(220,220,220)); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid); var_Bar->PutHeight(14); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"B",vtMissing); spG2antt1->EndUpdate(); |
1072 |
Is it possible to change the style for the vertical grid lines, in the chart area only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesDash); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesDash); var_Chart->PutLevelCount(2); var_Chart->GetLevel(1)->PutDrawGridLines(VARIANT_TRUE); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutGridLineColor(RGB(255,0,0)); var_Level->PutGridLineStyle(EXG2ANTTLib::exGridLinesVSolid); var_Chart->GetBars()->GetItem("Task")->PutPattern(EXG2ANTTLib::exPatternSolid); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"B",vtMissing); spG2antt1->EndUpdate(); |
1071 |
Is it possible to change the style for the grid lines, for instance to be solid not dotted
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesSolid); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesSolid); var_Chart->PutLevelCount(2); var_Chart->GetLevel(1)->PutDrawGridLines(VARIANT_TRUE); var_Chart->GetBars()->GetItem("Task")->PutPattern(EXG2ANTTLib::exPatternSolid); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"B",vtMissing); spG2antt1->EndUpdate(); |
1070 |
How can I show the grid lines for the chart and list area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutLevelCount(2); var_Chart->GetLevel(1)->PutDrawGridLines(VARIANT_TRUE); var_Chart->GetBars()->GetItem("Task")->PutPattern(EXG2ANTTLib::exPatternSolid); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"B",vtMissing); |
1069 |
In the level of the chart we are showing the week number of the year (1-53) (Week: ww). However the weeknumber isn't correct. In western Europe the week of 04/01/2010 till 10/01/2010 is weeknumber 1, however the g2antt says it's week 2
|
1068 |
How can I determine the current visible date range of the gantt chart area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),vtMissing,vtMissing); OutputDebugStringW( _bstr_t(spG2antt1->GetChart()->GetStartPrintDate()) ); OutputDebugStringW( _bstr_t(spG2antt1->GetChart()->GetEndPrintDate()) ); |
1067 |
How can I change the progress bar using a spin editor using values from 0 to 100
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Task"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Percent"))); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(518)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->Add(L"Task%Progress"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task%Progress",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutCellValue(h,long(1),long(40)); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task%Progress",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutCellValue(h,long(1),long(50)); spG2antt1->EndUpdate(); |
1066 |
Is it possible to display the histogram for selected bars only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutHistogramVisible(VARIANT_TRUE); var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramSelectedBars); var_Chart->PutHistogramHeight(32); var_Chart->GetBars()->GetItem("Task")->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),long(1),vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),long(2),vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),long(3),vtMissing); var_Items->PutItemBar(0,long(2),EXG2ANTTLib::exBarSelected,VARIANT_TRUE); var_Items->PutItemBar(0,long(3),EXG2ANTTLib::exBarSelected,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1065 |
How can I fix a bar, so it is not selectable, moveable or resizable, fixed in other words
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1","Unselectable"); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarSelectable,VARIANT_FALSE); spG2antt1->EndUpdate(); |
1064 |
How can I fix a bar, so it is not moveable or resizable
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","Fixed"); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarCanResize,VARIANT_FALSE); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarCanMove,VARIANT_FALSE); spG2antt1->EndUpdate(); |
1063 |
Is is possible to fix a bar during PDM scheduling
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"TaskF",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarCanResize,VARIANT_FALSE); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarCanMove,VARIANT_FALSE); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"TaskF",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h3,"K3",EXG2ANTTLib::exBarCanResize,VARIANT_FALSE); var_Items->PutItemBar(h3,"K3",EXG2ANTTLib::exBarCanMove,VARIANT_FALSE); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1062 |
How can I specify that during scheduling the link, bars should be delayed, on working part
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,3,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h2,"K2",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h3,"K3",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"link delays the bars<br>for <b>2</b> working days"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkPDMWorkingDelay,long(2)); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1061 |
How can I specify that during scheduling the link, bars should be delayed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText," Finish-Start<br>delayed <b>4</b> days"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkPDMDelay,long(4)); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1060 |
The SchedulePDM method put the bars on non-working part, how can I prevent that
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h1,"K1",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h2,"K2",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h3,"K3",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"FS"); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1059 |
How can I add a SF (Start-Finish) link so activities get arranged using the SchedulePDM
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"SF"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(0)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(2)); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1058 |
How can I add a SS (Start-Start) link so activities get arranged using the SchedulePDM
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"SS"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(0)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1057 |
How can I add a FF (Finish-Finish) link so activities get arranged using the SchedulePDM
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"FF"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkEndPos,long(2)); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1056 |
How can I add a FS (Finish-Start) link so activities get arranged using the SchedulePDM
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"FS"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"FS"); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1055 |
How can I schedule activities in the project plan
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h3,"K3",h2,"K2"); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1054 |
How do I arrange the bars based on the links
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->SchedulePDM(0,"K1"); spG2antt1->EndUpdate(); |
1053 |
Is is possible to use HTML tags to display in the filter caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarCaption(L"This is a bit of text being displayed in the filter bar."); spG2antt1->GetColumns()->Add(L""); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); spG2antt1->EndUpdate(); |
1052 |
How can I find the number of items after filtering
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L""); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(""); var_Items->PutCellValue(h,long(0),var_Items->GetVisibleItemCount()); spG2antt1->EndUpdate(); |
1051 |
How can I change the filter caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptWords | EXG2ANTTLib::exFilterPromptContainsAll)); spG2antt1->PutFilterBarPromptPattern(L"london robert"); spG2antt1->PutFilterBarCaption(L"<r>Found: ... "); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1050 |
While using the filter prompt is it is possible to use wild characters
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptPattern); spG2antt1->PutFilterBarPromptPattern(L"lon* seat*"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1049 |
How can I list all items that contains any of specified words, not necessary at the beggining
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptStartWords | EXG2ANTTLib::exFilterPromptContainsAny)); spG2antt1->PutFilterBarPromptPattern(L"london davolio"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1048 |
How can I list all items that contains any of specified words, not strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptWords | EXG2ANTTLib::exFilterPromptContainsAny)); spG2antt1->PutFilterBarPromptPattern(L"london nancy"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1047 |
How can I list all items that contains all specified words, not strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptWords | EXG2ANTTLib::exFilterPromptContainsAll)); spG2antt1->PutFilterBarPromptPattern(L"london robert"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1046 |
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptCaseSensitive | EXG2ANTTLib::exFilterPromptContainsAny)); spG2antt1->PutFilterBarPromptPattern(L"Anne"); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1045 |
Is it possible to list only items that ends with any of specified strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptEndWith); spG2antt1->PutFilterBarPromptColumns("0"); spG2antt1->PutFilterBarPromptPattern(L"Fuller"); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1044 |
Is it possible to list only items that ends with any of specified strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptEndWith); spG2antt1->PutFilterBarPromptColumns("0"); spG2antt1->PutFilterBarPromptPattern(L"Fuller"); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1043 |
Is it possible to list only items that starts with any of specified strings
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptStartWith); spG2antt1->PutFilterBarPromptColumns("0"); spG2antt1->PutFilterBarPromptPattern(L"An M"); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1042 |
Is it possible to list only items that starts with specified string
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptStartWith); spG2antt1->PutFilterBarPromptColumns("0"); spG2antt1->PutFilterBarPromptPattern(L"A"); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1041 |
How can I specify that the list should include any of the seqeunces in the pattern
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptContainsAny); spG2antt1->PutFilterBarPromptPattern(L"london seattle"); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1040 |
How can I specify that all sequences in the filter pattern must be included in the list
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::exFilterPromptContainsAll); spG2antt1->PutFilterBarPromptPattern(L"london manager"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1039 |
How do I change at runtime the filter prompt
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptPattern(L"london manager"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1038 |
How do I specify to filter only a single column when using the filter prompt
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPromptColumns("2,3"); spG2antt1->PutFilterBarPromptPattern(L"london"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1037 |
How do I change the prompt or the caption being displayed in the filter bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); spG2antt1->PutFilterBarPrompt(L"changed"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); spG2antt1->EndUpdate(); |
1036 |
How do I enable the filter prompt feature
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutFocusColumnIndex(1); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96); var_Columns->Add(L"City"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
1035 |
How can I unselect all bars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarSelected,VARIANT_FALSE); |
1034 |
Can I select bars using a pattern using wild characters as *,
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1K","K1K"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2M","K2M"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"K3K","K3K"); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q"); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M"); var_Items->PutItemBar(0,"<K*K>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE); |
1033 |
How can I select all bars in the item with a specified key
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"P","P"); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q"); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M"); var_Items->PutItemBar(h,"<K*>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE); |
1032 |
How can I select all bars in the specified item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"P","P"); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q"); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M"); var_Items->PutItemBar(h,"<*>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE); |
1031 |
How can I select all bars with a specified key
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"P","P"); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q"); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"P","P"); var_Items->PutItemBar(0,"<P>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE); |
1030 |
How can I select all bars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"P","P"); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q"); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M"); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE); |
1029 |
I have the AllowInsideZoom property on True, but I am still not able to use the inside zoom feature
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(3); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->GetLevel(0)->PutLabel("Week: <%ww%>"); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(2)->PutLabel(long(65536)); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); var_Chart->PutAllowInsideZoom(VARIANT_TRUE); EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat(); var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exMinute); var_InsideZoomFormat->PutInsideLabel(L"<b><%nn%></b>"); var_Chart->GetInsideZooms()->Add(COleDateTime(2001,1,1,10,00,00).operator DATE()); spG2antt1->EndUpdate(); |
1028 |
Is there any option to find out if two bars intersects
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(22); spG2antt1->GetColumns()->Add(L"InterectBars"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsOffset); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(""); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"B","B"); var_Items->PutCellValue(h,long(0),var_Items->GetIntersectBars(h,"A",h,"B")); h = var_Items->AddItem(""); var_Items->AddBar(h,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),"B","B"); var_Items->PutCellValue(h,long(0),var_Items->GetIntersectBars(h,"A",h,"B")); h = var_Items->AddItem(""); var_Items->AddBar(h,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B","B"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),"A","A"); var_Items->PutCellValue(h,long(0),var_Items->GetIntersectBars(h,"A",h,"B")); spG2antt1->EndUpdate(); |
1027 |
How can I find if a specified hour is a working or non-working hour, when using the ItemNonWorkingUnits
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Hour")))->PutFormatColumn(L"hour(value)"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Type")))->PutFormatColumn(L"value != 0 ? 'non-working' : 'working'"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,164); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(1); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); VARIANT_BOOL w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),vtMissing); var_Items->PutCellValue(h,long(1),w); h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"hour(value) >0 "); w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),h); var_Items->PutCellValue(h,long(1),w); spG2antt1->EndUpdate(); |
1026 |
How can I find if a specified hour is a working or non-working hour
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Hour")))->PutFormatColumn(L"hour(value)"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Type")))->PutFormatColumn(L"value != 0 ? 'non-working' : 'working'"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,164); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(1); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); VARIANT_BOOL w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),vtMissing); var_Items->PutCellValue(h,long(1),w); h = var_Items->AddItem(COleDateTime(2001,1,1,1,00,00).operator DATE()); w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),vtMissing); var_Items->PutCellValue(h,long(1),w); spG2antt1->EndUpdate(); |
1025 |
How can I find if a specified date-time is a working or non-working unit, when using the ItemNonWorkingUnits
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->PutWidth(48); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Type")))->PutFormatColumn(L"value != 0 ? 'non-working' : 'working'"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); VARIANT_BOOL w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),vtMissing); var_Items->PutCellValue(h,long(1),w); h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"weekday(value) in (1)"); w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),h); var_Items->PutCellValue(h,long(1),w); spG2antt1->EndUpdate(); |
1024 |
How can I find if a specified date-time is a working or non-working unit
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->PutWidth(48); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Type")))->PutFormatColumn(L"value != 0 ? 'non-working' : 'working'"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE()); VARIANT_BOOL w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),vtMissing); var_Items->PutCellValue(h,long(1),w); h = var_Items->AddItem(COleDateTime(2001,1,6,0,00,00).operator DATE()); w = spG2antt1->GetChart()->GetIsNonworkingDate(spG2antt1->GetItems()->GetCellValue(h,long(0)),vtMissing); var_Items->PutCellValue(h,long(1),w); spG2antt1->EndUpdate(); |
1023 |
When zooming to days, the non-working part of the chart occupies some not useful space. Can I reduce it
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE()); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutLevelCount(2); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->GetLevel(0)->PutLabel("Week: <%ww%>"); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutLabel("<%d%>/<%m2%>"); var_Level->PutFormatLabel(L"weekday(dvalue) in (0,6) ? 'end' : value"); var_Chart->PutUnitWidth(32); var_Chart->PutUnitWidthNonworking(-32); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Default"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),"A",vtMissing); spG2antt1->EndUpdate(); |
1022 |
My chart display only working hours, but when zooming to days, each day shows the non-working part of the day too, even if I use the ShowNonWorkingUnits property on False. What am I doing wrong
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,10,00,00).operator DATE()); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutLevelCount(2); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->GetLevel(0)->PutLabel("<%ww%>"); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutLabel("<%dd%>"); var_Level->PutUnit(EXG2ANTTLib::exHour); var_Level->PutCount(24); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); var_Chart->PutUnitWidth(32); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Default"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,10,00,00).operator DATE(),COleDateTime(2002,1,8,2,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1021 |
I need to display only working hours and weekend part, but for some items I need another non-working part. Is this possible
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE()); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutLevelCount(2); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%ddd%>"); var_Level->PutFormatLabel(L"weekday(dvalue) in (0,6) ? '' : value"); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutLabel(long(65536)); var_Level1->PutFormatLabel(L"weekday(dvalue) in (0,6) ? 'end' : value"); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); var_Chart->PutUnitWidthNonworking(-24); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Default"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); h = var_Items->AddItem("Friday"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,7,12,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"weekday(value) in (0,6,5) or hour(value)<10 or hour(value)>=14"); h = var_Items->AddItem("Till 13"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,7,12,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"weekday(value) in (0,6) or hour(value)<10 or hour(value)>=13"); spG2antt1->EndUpdate(); |
1020 |
I can display the working hours, but how can I hide the weekend or non-working part of the chart when using the ShowNonWorkingUnits property on False
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->GetLevel(0)->PutLabel("<%ddd%>"); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); |
1019 |
How can I display only the working hours but uses less space for non-working part, such as weekend
|
1018 |
How can I display only the working hours but uses less space for non-working part, such as weekend
|
1017 |
How can I display only the working hours
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->GetLevel(0)->PutLabel("<%ddd%>"); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); |
1016 |
How can I specify non-working hours
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->GetLevel(0)->PutLabel("<%ddd%>"); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutNonworkingHours(16761855); |
1015 |
How can I display the working hours for a bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Tasks"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Working"))); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258)); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"A"); var_Column->PutFormatColumn(L"(0:=round(value*24)) != 0 ? =:0 : ''"); spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->GetLevel(0)->PutLabel("<%ddd%>"); var_Chart->GetLevel(1)->PutLabel("<%hh%>"); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,4,0,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1014 |
Is it possible to show only working hours, showing a small part for the weekend days, and in the same time showing the bars by splitting the non-working part and keeping the working units for the bar while moving
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%ddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Level->PutFormatLabel(L"weekday(dvalue) in (0,6) ? `` : value"); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutLabel(long(65536)); var_Level1->PutDrawGridLines(VARIANT_TRUE); var_Level1->PutFormatLabel(L"weekday(dvalue) in (0,6) ? `<font ;6>weekend</font>` : value"); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_TRUE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); var_Chart->PutUnitWidthNonworking(-40); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),"A",vtMissing); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); spG2antt1->EndUpdate(); |
1013 |
How can I show bars with different solid color but black border
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetVisualAppearance()->Add(1,"C:\\Program Files\\Exontrol\\ExG2antt.NET\\sample\\EBN\\blackbox.ebn"); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = spG2antt1->GetChart()->GetBars()->GetItem("Task"); var_Bar->PutColor(0x1000000); var_Bar->PutHeight(15); spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,0); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(65535)); h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255)); spG2antt1->EndUpdate(); |
1012 |
I want to display a vertical line for each week, while I still need a vertical separator for each day. Is this possible
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutGridLineColor(RGB(240,240,240)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutNonworkingDays(0); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutDrawGridLines(VARIANT_TRUE); var_Level->PutGridLineColor(RGB(0,0,0)); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutDrawGridLines(VARIANT_TRUE); var_Level1->PutGridLineColor(RGB(240,240,240)); |
1011 |
How can I display the levels as year, day, AM and PM for each day
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,1,0,00,00).operator DATE()); var_Chart->PutUnitWidth(22); var_Chart->PutLevelCount(3); var_Chart->GetLevel(0)->PutLabel("<%yyyy%>"); var_Chart->GetLevel(1)->PutLabel("<%mm%>/<%dd%>"); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(2); var_Level->PutLabel("<%AM/PM%>"); var_Level->PutCount(12); |
1010 |
How can I change the pattern for a specified time unit, in the chart area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE()); var_Chart->PutAllowInsideZoom(VARIANT_TRUE); var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE); var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE); EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat(); var_InsideZoomFormat->PutPatternChart(EXG2ANTTLib::exPatternBDiagonal); var_InsideZoomFormat->PutPatternColorChart(RGB(255,0,0)); EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms(); var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE); var_InsideZooms->PutDefaultWidth(18); var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE); spG2antt1->EndUpdate(); |
1009 |
How can I hide the non-working hours, but still display the non-working days with even less space
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,11,19,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Level->PutFormatLabel(L"weekday(dvalue) in (0,6) ? `` : value"); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutLabel(long(65536)); var_Level1->PutDrawGridLines(VARIANT_TRUE); var_Level1->PutFormatLabel(L"weekday(dvalue) in (0,6) ? `<font ;6>weekend</font>` : value"); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_TRUE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); var_Chart->PutUnitWidth(32); var_Chart->PutUnitWidthNonworking(-32); spG2antt1->EndUpdate(); |
1008 |
How can I hide the non-working hours, but still display the non-working days with less space
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,11,19,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Level->PutFormatLabel(L"weekday(dvalue) in (0,6) ? `<font ;6>` + value + `</font>` : value"); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutLabel(long(65536)); var_Level1->PutDrawGridLines(VARIANT_TRUE); var_Level1->PutFormatLabel(L"weekday(dvalue) in (0,6) ? `<font ;6>` + value + `</font>` : value"); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_TRUE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); var_Chart->PutUnitWidth(32); var_Chart->PutUnitWidthNonworking(12); spG2antt1->EndUpdate(); |
1007 |
How can I hide the non-working hours, but still display the non-working days
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,11,19,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutLabel(long(65536)); var_Level1->PutDrawGridLines(VARIANT_TRUE); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_TRUE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); spG2antt1->EndUpdate(); |
1006 |
How can I hide the non-working hours, and the non-working days
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,11,19,0,00,00).operator DATE()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1); var_Level1->PutLabel(long(65536)); var_Level1->PutDrawGridLines(VARIANT_TRUE); var_Chart->PutNonworkingHours(16761855); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); spG2antt1->EndUpdate(); |
1005 |
Can I highlights the non-working hours while my chart shows days
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutUnitWidth(48); var_Chart->PutLevelCount(2); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutLabel("<%d%>"); var_Level->PutUnit(EXG2ANTTLib::exHour); var_Level->PutCount(24); var_Chart->PutNonworkingHours(127); |
1004 |
How can I reduce the space/area being occupied by non-working units days or hours (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutUnitWidthNonworking(-8); var_Chart->GetLevel(1)->PutFormatLabel(L"weekday(dvalue) in (0,6) ? '.' : value"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing); var_Items->PutItemBar(h,"<*>",EXG2ANTTLib::exBarColor,long(255)); spG2antt1->EndUpdate(); |
1003 |
How can I reduce the space/area being occupied by non-working units days or hours (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutUnitWidthNonworking(4); var_Chart->GetLevel(1)->PutFormatLabel(L"weekday(dvalue) in (0,6) ? '' : value"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing); var_Items->PutItemBar(h,"<*>",EXG2ANTTLib::exBarColor,long(255)); spG2antt1->EndUpdate(); |
1002 |
How can I hide the non-working units
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutDrawGridLines(EXG2ANTTLib::exVLines); var_Chart->GetLevel(0)->PutDrawGridLines(VARIANT_TRUE); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K4",vtMissing); var_Items->PutItemBar(h,"<*>",EXG2ANTTLib::exBarColor,long(255)); spG2antt1->EndUpdate(); |
1001 |
How can I determine that a certain bar is the topmost (zorder)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,27,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutPattern(EXG2ANTTLib::exPatternSolid); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("B in front"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"B","<fgcolor=FF0000>B</fgcolor>"); var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarOffset,long(-2)); var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarColor,long(255)); h = var_Items->AddItem("A in back"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A","<fgcolor=FF0000>A</fgcolor>"); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarOffset,long(-2)); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarColor,long(255)); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"B",vtMissing); spG2antt1->EndUpdate(); |